package com.sanji.sjmallmodule.goods;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;

import com.sanji.sjmallapp.BaseActivity;
import com.sanji.sjmallapp.R;

import butterknife.BindView;
import butterknife.ButterKnife;

/****
 * 产品参数页
 *****/
public class GoodsParamsActivity extends BaseActivity implements View.OnClickListener {
    @BindView(R.id.common_left_tv)
    TextView commonLeftTv;
    @BindView(R.id.common_right_img)
    ImageView commonRightImg;
    @BindView(R.id.common_back_img)
    ImageView commonBackImg;
    @BindView(R.id.cpu_number_tv)
    TextView cpuNumberTv;
    @BindView(R.id.cpu_rate_tv)
    TextView cpuRateTv;
    @BindView(R.id.ram_tv)
    TextView ramTv;
    @BindView(R.id.goods_storage_ram_tv)
    TextView goodsStorageRamTv;
    @BindView(R.id.screen_size_tv)
    TextView screenSizeTv;
    @BindView(R.id.resolution_tv)
    TextView resolutionTv;
    @BindView(R.id.front_camera_tv)
    TextView frontCameraTv;
    @BindView(R.id.post_camera_tv)
    TextView postCameraTv;
    private GoodsParamBean goodsParamBean;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_goods_params);
        ButterKnife.bind(this);
        initView();
    }

    public void initView() {
        commonLeftTv.setText(getString(R.string.goods_parameter));
        goodsParamBean = (GoodsParamBean) getIntent().getSerializableExtra("goodsParam");
        commonBackImg.setOnClickListener(this);
        cpuNumberTv.setText(goodsParamBean.getCpuNumber());
        cpuRateTv.setText(goodsParamBean.getCpuRate());
        ramTv.setText(goodsParamBean.getRam());
        goodsStorageRamTv.setText(goodsParamBean.getBodyMemory());
        screenSizeTv.setText(goodsParamBean.getScreenSize());
        resolutionTv.setText(goodsParamBean.getResolution());
        frontCameraTv.setText(goodsParamBean.getFrontCamera());
        postCameraTv.setText(goodsParamBean.getPostCamera());
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.common_back_img:
                finish();
                break;
        }
    }
}
